﻿using UnityEngine;
using System.Collections;

public class TopDownPlayer : MonoBehaviour 
{

	protected Animator animator;

	protected int speed = 2;

	void Awake()
	{
		animator = GetComponent<Animator>();
	}

	// Use this for initialization
	void Start () 
	{
	
	}
	
	// Update is called once per frame
	void Update () 
	{
	
	}

	void Movement(string horizontalAxis, string verticalAxis)
	{
		float moveVertical = 0;
		float moveHorizontal = 0;

		moveVertical = Input.GetAxis (verticalAxis)*Time.deltaTime*speed;
		moveHorizontal = Input.GetAxis (horizontalAxis)*Time.deltaTime*speed;

		if (moveVertical > 0)
		{
			this.transform.position += new Vector3(0,moveVertical);
		}
		else if(moveVertical < 0)
		{
			this.transform.position += new Vector3(0,moveVertical);
		}
		else if(moveHorizontal > 0)
		{
			this.transform.position += new Vector3(0,moveHorizontal);
		}
		else if(moveHorizontal < 0)
		{
			this.transform.position += new Vector3(0,moveHorizontal);
		}
	}
}
